import request from './request'

// 获取用户信息
export const getUserInfo = () => {
    return request<any, true>({
        url: '/simple-user-center-server/api/v1.0/user/login-user',
    })
}

// 获取权限
export const getSystemMenus = (systemCode: string) => {
    return request<any, false>({
        url: `/bsp-permission-server/api/v1.0/permissions/systemMenus?systemCode=${systemCode}`,
        method: 'post',
        data: {
            systemCode,
        },
    })
}

// 退出
export const loginOut = () => {
    return request<boolean>({
        url: '/simple-user-center-server/api/v1.0/user/logout',
    })
}

// 获取token
export const getUserToken = () => {
    return request<any, true>({
        url: '/simple-user-center-server/api/v1.0/user/token',
    })
}
